
**********************
 * S1 Generate Event
 **********************
 
 
  gl dirraiz "/Users/adansilverio/Dropbox/Copia de Paper 32 IMCO Adan"

  
  tab even, gen(T) /* Genera las dummies para la regresion: Nota T9 es el periodo -1. Tenemos de T1 a T8 y de T10 a T19   */
  
  
  
 * Honest DD

 reghdfe pct_disc T1 T2 T3 T4 T5 T6 T7 T8 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19, absorb(i.month_inicio i.year_inicio i.inst_factor) cluster(inst_factor) noconstant
  
  
 matrix l_vec = 0.0 \ 0.20 \ 0.20 \ 0.20 \ 0.20 \ 0.20 \ 0.0 \ 0.0 \ 0.0 \ 0.0
local plotopts xtitle(Mbar) ytitle(95% Robust CI)
honestdid, l_vec(l_vec) pre(1/8) post(9/18) mvec(0(0.1)0.5) omit coefplot `plotopts'
  
 * Oster

 
 areg pct_disc T1 T2 T3 T4 T5 T6 T7 T8 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19 i.month_inicio i.year_inicio , absorb(inst_factor) cluster(inst_factor) 

psacalc beta T11, delta(1) rmax(.43914) /* Rmax=1.3*R2  (-0.02, 0.53) NO*/
psacalc beta T11, delta(-1) rmax(.43914) /* Rmax=1.3*R2 */

psacalc beta T12, delta(1) rmax(.43914) /* Rmax=1.3*R2  (0.11, 0.57)*/
psacalc beta T12, delta(-1) rmax(.43914) /* Rmax=1.3*R2 */

psacalc beta T13, delta(1) rmax(.43914) /* Rmax=1.3*R2  (0.07, 0.75)*/
psacalc beta T13, delta(-1) rmax(.43914) /* Rmax=1.3*R2 */

psacalc beta T14, delta(1) rmax(.43914) /* Rmax=1.3*R2  (0.13, 0.70)*/
psacalc beta T14, delta(-1) rmax(.43914) /* Rmax=1.3*R2 */

psacalc beta T15, delta(1) rmax(.43914) /* Rmax=1.3*R2  (0.10, 0.72)*/
psacalc beta T15, delta(-1) rmax(.43914) /* Rmax=1.3*R2 */

